home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / SegLoad.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  2.6 KB  |  132 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        SegLoad.h
  3.  
  4.      Contains:    Segment Loader Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __SEGLOAD__
  18. #define __SEGLOAD__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC
  48. /*
  49.    CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  50.    and the AppFile data structure and enums are obsolete. 
  51.    They are still supported for writing old style 68K apps, 
  52.    but they are not supported for CFM-based apps.
  53.    Use AppleEvents to determine which files are to be 
  54.    opened or printed from the Finder.
  55. */
  56. enum {
  57.     appOpen                        = 0,                            /*Open the Document (s)*/
  58.     appPrint                    = 1                                /*Print the Document (s)*/
  59. };
  60.  
  61.  
  62. struct AppFile {
  63.     short                             vRefNum;
  64.     OSType                             fType;
  65.     short                             versNum;                    /*versNum in high byte*/
  66.     Str255                             fName;
  67. };
  68. typedef struct AppFile                    AppFile;
  69. EXTERN_API( void )
  70. CountAppFiles                    (short *                message,
  71.                                  short *                count);
  72.  
  73. EXTERN_API( void )
  74. GetAppFiles                        (short                     index,
  75.                                  AppFile *                theFile);
  76.  
  77. EXTERN_API( void )
  78. ClrAppFiles                        (short                     index);
  79.  
  80. EXTERN_API( void )
  81. GetAppParms                        (Str255                 apName,
  82.                                  short *                apRefNum,
  83.                                  Handle *                apParam)                            ONEWORDINLINE(0xA9F5);
  84.  
  85. EXTERN_API_C( void )
  86. getappparms                        (char *                    apName,
  87.                                  short *                apRefNum,
  88.                                  Handle *                apParam);
  89.  
  90. #endif  /* TARGET_CPU_68K && !TARGET_RT_MAC_CFM || !TARGET_OS_MAC */
  91.  
  92.  
  93. /*
  94.    Because PowerPC applications don't have segments.
  95.    But, in order to allow applications to not have conditionalized
  96.    source code, UnloadSeg is macro'ed away for PowerPC.
  97. */
  98. #if TARGET_CPU_68K
  99. EXTERN_API( void )
  100. UnloadSeg                        (void *                    routineAddr)                        ONEWORDINLINE(0xA9F1);
  101.  
  102. #else
  103. #define UnloadSeg(x)
  104. #endif  /* TARGET_CPU_68K */
  105.  
  106. /* ExitToShell() has moved to Process.h*/
  107.  
  108.  
  109.  
  110.  
  111.  
  112. #if PRAGMA_STRUCT_ALIGN
  113.     #pragma options align=reset
  114. #elif PRAGMA_STRUCT_PACKPUSH
  115.     #pragma pack(pop)
  116. #elif PRAGMA_STRUCT_PACK
  117.     #pragma pack()
  118. #endif
  119.  
  120. #ifdef PRAGMA_IMPORT_OFF
  121. #pragma import off
  122. #elif PRAGMA_IMPORT
  123. #pragma import reset
  124. #endif
  125.  
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129.  
  130. #endif /* __SEGLOAD__ */
  131.  
  132.